<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>业务员管理 - 销售业绩管理系统</title>
<style type="text/css">
<!--
.STYLE1 {	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}
.STYLE6 {font-size: 12px; }
.STYLE7 {font-size: 12px; background-color: #f5f5f5;margin:0;}
.STYLE9 {font-size: 12px; background-color: #ffffff;margin:0;}
.STYLE8 {color: #FFFFFF;font-weight: bold;font-size: 12px; background-color: #1C94C4;margin:0; }
body { 
margin:0;
}
a:link {
	color: #0066FF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #0099FF;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>
<link href="../components/mmGrid/mmGrid.css" rel="stylesheet"
	type="text/css" media="all" />
<link href="../components/mmGrid/mmPaginator.css" rel="stylesheet"
	type="text/css" media="all" />
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../components/mmGrid/mmGrid.js"></script>
<script type="text/javascript" src="../components/mmGrid/mmPaginator.js"></script>
<script LANGUAGE="javascript"> 
function showView(id){
window.open('ResultFinal.html?id=' + id,'_blank','width=500,height=600,left=200,top=150,resizable=1,status=1'); 
}
</script>

<body margin=0>

<table width="100%" bgcolor="#FFFFFF"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="24" class="STYLE7">
      <table width="100%" border="0" cellspacing="2">
        <tr>
          <td height="25" class="STYLE7">业绩管理 &gt;业绩结算详细信息</td>
        </tr>
        <tr>
          <td class="STYLE9">业务员名称：
            <input id="ywyname" name="textfield2" type="text" size="10" />
&nbsp;
应结金额：<select id="money">
	<option value="0">结算金额大于0</option>
	<option value="1">所有记录</option>
</select>
&nbsp;
<input type="button" name="Submit3" onclick="search()" value="查询" />
&nbsp;&nbsp;
<input type="button" name="Submit" value="导出Excel" onclick="export2excel()"/></td>
        </tr>
      </table>     </td>
  </tr>
 
</table>
<table id="userTable"  style="font-size:12px !important;">
			<tr >
				<th rowspan="" colspan=""></th>
			</tr>
	</table>
	<div id="userpg" style="text-align:right;margin-right:10px;font-size:12px;"></div>
</body>
</html>
<script>
var url = window.location + "";
var id = url.substring(url.indexOf("?id=") + 4, url.length);
var userCol = [
               {title:'业务员名称',align: 'center', name:'SalesmanName',width:100},
              	{title:'累计核销积分',align: 'center', name:'TotalIntegral',width:50},
					{title:'累计结算金额',align: 'center', name:'TotalMoney',width:50},
					{title:'本次应结金额',align: 'center', name:'ThisMoney',width:50},
					{title:'联系电话',align: 'center', name:'Telephone',width:100},
					{title:'结算日期',align: 'center', name:'CreateDate',width:100},
					{title:'操作',name:'',align:'center',lockWidth:true,lockDisplay: true,renderer: function(val){
	                     return '<button type="button" class="info">详细</button>';
	                 }
					},
					{title:'备注',align: 'center', name:'ExplainInfo',width:400}
           ];
	var userGrid = $('#userTable').mmGrid({
     height: 300
		,width:'99%'
		,indexCol: true
     , cols: userCol
     , url: '../verification/everydetail?id=' + id + '&f=0'
     , method: 'get'
     , root: 'data'
     , multiSelect: false
     , checkCol: false
     , fullWidthRows: true
     , nowrap: true
     , plugins: [
         $('#userpg').mmPaginator({limitList: [10, 20, 30,50]})
     ]
 });

	userGrid.on('cellSelected', function(e, item, rowIndex, colIndex){
     if($(e.target).is('.info')){
         e.stopPropagation();
         showView(item.ID);
     }
 });
	function search(){
		userGrid.load({f1:$("#money").val(),ywy:$("#ywyname").val()});
	}
	function export2excel(){
		var url = "../verification/export2excel?id=" + id;
		window.open(url);
	}
</script>